home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / echsys10.zip / PUSHD1.BAT < prev   
DOS Batch File  |  1989-09-23  |  708b  |  23 lines

  1. @Echo Off
  2. Rem  Save current drive and directory for later return by POPD
  3. Rem  (maximum nesting level: 9; may be extended)
  4. Rem  Assumes room for temporary batch file on drive C:
  5. Set temp=
  6. If "%dir9%" == "" Set temp=9
  7. If "%dir8%" == "" Set temp=8
  8. If "%dir7%" == "" Set temp=7
  9. If "%dir6%" == "" Set temp=6
  10. If "%dir5%" == "" Set temp=5
  11. If "%dir4%" == "" Set temp=4
  12. If "%dir3%" == "" Set temp=3
  13. If "%dir2%" == "" Set temp=2
  14. If "%dir1%" == "" Set temp=1
  15. If "%temp%" == "" Goto pushdstackfull
  16. echosys Set dsk%temp%=^:^x0d^x0aSet dir%temp%=^\^x0d^x0adel c:\temp$$$$.bat>c:\temp$$$$.bat
  17. Set temp=
  18. c:\temp$$$$.bat
  19. Rem We never fall through to here!
  20. :pushdstackfull
  21. Echo Stack is full!
  22. :pushdend
  23.